package com.tiantian.novel.model;

import java.io.Serializable;
import java.util.List;

/**
 * chapter group
 *
 * @author wangkai
 * @since 2020/12/18.
 */
public class GroupInfo implements Serializable {
    private String id;
    private String title;
    private List<ChapterInfo> chapters;

    public GroupInfo(int id, String title, List<ChapterInfo> chapters) {
        this.id = String.valueOf(id);
        this.title = title;
        this.chapters = chapters;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<ChapterInfo> getChapters() {
        return chapters;
    }

    public void setChapters(List<ChapterInfo> chapters) {
        this.chapters = chapters;
    }

    public GroupInfo append(ChapterInfo info) {
        this.chapters.add(info);
        return this;
    }
}
